package org.pupil.socket.serialization;

import org.pupil.common.constants.RpcSerialization;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description: 序列化工厂
 * @Author: pupil
 * @Date: 2024/07/07 下午 1:21
 */
public class SerializationFactory {

    private static Map<RpcSerialization, org.pupil.socket.serialization.RpcSerialization> serializationMap
    = new HashMap<RpcSerialization, org.pupil.socket.serialization.RpcSerialization>();

    static {
        serializationMap.put(RpcSerialization.JSON, new JsonSerialization());
    }

    public static org.pupil.socket.serialization.RpcSerialization get(RpcSerialization rpcSerialization){
       return serializationMap.get(rpcSerialization);
    }
}
